{template "header.html"}
<!--首页导航-->
{template "index-daohang.html"}
<!--首页列表-->
{php $uidbeijingtu = \Phpcmf\Service::M()->db->table('member_data')->where('id', $myuid)->get()->getRowArray();}
<div class="container d-shang-15 {if $_GET['s'] == 'huiyuan' && $_GET['uid'] > 0} d-yincang {/if}">
</div>
<div>
	<div id="huiyuan">
		

	<div class="d-kuangjia d-kuangjia-0" >
		<div class="row" >
			<div class="col-md-2 d-yincang d-piaofu-95" style="z-index: 1000;">
				<span style="width: 10px; color: #ffffff;">.</span>
				<div class="d-piaofu-0-2">
					{template "index-zuobian-quanzi.html"}
				</div>
			</div>
			<div class="col-md-7" >
				<div class="row">
					<div style="background-color: {$beijingyanse};height: 150px;">
						
					{if $uidbeijingtu['beijingtu']}
					<div class="d-kuan d-beijing-baise d-yuanjiao-bianhua-10-10 d-gao-50" >
						<img src="{dr_thumb($uidbeijingtu['beijingtu'])}"  height="200" 
						style="object-fit: cover; max-width: 100%; width: 100%;" class="d-yuanjiao-bianhua-10-10"/>
					</div>
					{else}
					<div class="d-kuan d-beijing-baise d-yuanjiao-bianhua-10-10 d-gao-50" >
						
						<img src="{HOME_THEME_PATH}web/img/geren.svg"  height="200" 
						style="object-fit: cover; max-width: 100%; width: 100%;" class="d-yuanjiao-bianhua-10-10"/>
						
					</div>
					{/if}
					{if $member.id ==$uid}
					<div style="margin-top: -40px;">
						<a data-toggle="modal" data-target="#mytupian" @click="beijingtu">
							<i class="fa fa-cog d-wenzi-14 d-zuo-10"></i>
						</a>
					</div>
					{/if}
				</div>
				<div class="d-clear"></div>
				<div class="d-kuan d-beijing-baise d-yuanjiao-bianhua-10-10  d-buhuanhang " >
					<div class="d-kuan-100 d-zuo-10 d-wenzi-juzhong d-shang-15">
						<img src="{dr_avatar($uid)}" width="80" height="80"
						style="" class="d-yuanjiao-50"/>
						
					</div>
					<div class="d-kuan " style="margin-top: 28px;">
						<div class="col-xs-3 d-wenzi-juzhong">
							<div class="d-wenzi-16 d-jiacu">
								{count action=table table=1_quan uid=$uid zt=1 return=quanzi}
								{$quanzi_count}
							</div>
							<div class="d-zitiyanse-hui">圈子</div>
						</div>
						<div class="col-xs-3 d-wenzi-juzhong d-quxian-0">
							<a {if $member.id == $uid} href="/index.php?s=member&app=quan&c=woquan&m=guanzhu"{/if}>
								<div class="d-wenzi-16 d-jiacu">
									{count action=table table=member_friend uid=$uid} 
								</div>
								<div class="d-zitiyanse-hui">关注</div>
							</a>
						</div>
						<div class="col-xs-3 d-wenzi-juzhong d-quxian-0">
							<a {if $member.id == $uid} href="/index.php?s=member&app=quan&c=woquan&m=fensi" {/if}>
								<div class="d-wenzi-16 d-jiacu">
									{count action=table table=member_friend touid=$uid}
								</div>
								<div class="d-zitiyanse-hui">粉丝</div>
							</a>
						</div>
						<div class="col-xs-3 d-wenzi-juzhong">
							<div class="d-wenzi-16 d-jiacu">
								{count action=table table=1_quan_form_son uid=$uid return=quantie}
								{$quantie_count}
							</div>
							<div class="d-zitiyanse-hui">动态</div>
						</div>
					</div>
					<div class="d-clear"></div>
				</div>
				<div class="d-clear"></div>
				<div class="d-kuan d-beijing-baise d-buhuanhang " >
					<div class="d-zuo-20 d-kuan d-shang-15">
						<div class="d-wenzi-18 d-jiacu">
							{php $userweixin=\Phpcmf\Service::M()->db->table('member_oauth')->where('uid', $uid)->get()->getRowArray();}
							{php $user=dr_member_info($uid);}
								{if $user.name}
									{$user.name}
								{elseif $userweixin.nickname}
									{$userweixin.nickname}
								{else}
									{$user.username}
								{/if}
						</div>
					</div>
					<div class="d-kuan-160 d-shang-15 d-xia-20 d-you-10 d-quxian-0">
						<div class="d-zitiyanse-hui d-zuo-10 d-div-you d-buhuanhang">
							<a  id="guanzhu_list_{$uid}" data-id="{$uid}" class="guanzhu_list">
								{dr_guanzhu_list($uid, $member.id)} 
							</a>
						</div>
					</div>
					<script type="text/javascript">
					//关注
						$(".guanzhu_list").click(function(){
							var id = $(this).data("id");
							$.get("{dr_url_prefix('index.php')}?s=huiyuan&c=show&m=friend&uid="+id, function(data){
								dr_cmf_tips(data.code, data.msg);
								if (data.data.status==1) {
									//window.location.reload();
									$('#module_guanzhu_list_'+id).html(data.data);
									$('#guanzhu_list_'+id).html('<div class=" d-beijing-hui d-yuanjiao-20 d-neikuang-5-10 d-div-you d-wenzi-12"><i class="fa fa-check-circle-o"></i> 已关注</div>');
									
								}else{
									//window.location.reload();
									$('#module_guanzhu_list_'+id).html(data.data);
									$('#guanzhu_list_'+id).html('<div class=" d-beijing-hui d-yuanjiao-20 d-neikuang-5-10 d-div-you d-wenzi-12">关 注</div>');
									
								}
							}, 'json');
						});
					</script>
					
					<div class="d-clear"></div>
				</div>
				<div class="d-clear"></div>
				<!--导航-->
				<div class="d-kuan d-beijing-baise d-bianhua-20 d-beijing-baise d-yuanjiao-bianhua-10-10-xia">
					<div class="row d-buhuanhang d-xia-20">
						<div class="d-neikuang-5-10 d-wenzi-16 {if $_GET['m'] == 'index' }d-a-hei d-jiacu {else} d-a-hui {/if}">
							<a href="{d_huiyuan_url($uid)}">全部</a>
						</div>
						<div class="d-neikuang-5-10 d-wenzi-16  {if $_GET['m'] == 'quan' } d-jiacu d-a-hei {else} d-a-hui{/if}">
							<a href="{dr_url('huiyuan/show/quan',['uid' => $uid])}">圈子</a>
						</div>
						<div class="d-neikuang-5-10 d-wenzi-16  {if $_GET['m'] == 'simi' } d-jiacu d-a-hei {else} d-a-hui{/if}">
							<a href="{dr_url('huiyuan/show/simi',['uid' => $uid])}">私密圈子</a>
						</div>
						<!--div class="d-neikuang-5-10 d-wenzi-16 d-zitiyanse-hui">
							问答
						</div-->
					</div>
					<div class="d-xian"></div>
					<!--置顶-->
					<div class="row d-shang-20">
						{php $i=1;}
						{mform module=quan form=son order=inputtime cid=$id uid=$myuid zhiding=1 num=4 return=tt}
							<div class="d-neikuang-5-10 d-wenzi-16  d-chaochu">
								<span class="d-wenzi-12 d-biaoqian-30 d-yuanjiao-5">置顶</span>
								<span class="d-quxian-0 d-zuo-10 ">
									<a href="/quan/{$tt.id}.html">
									{if $tt.title}
									{$tt.title} 
									{else} 
									{dr_strcut(dr_clearhtml($tt.neirong), 30)}
									{/if}
									</a>
								</span>
							</div>
							{php $i++;}
						{/mform}
					</div>
					
					<!--帖子-->
					
				</div>
				{if $_GET['m'] == 'index' }
					<div id="content_list">
						{if $quantiezifengge==4}
						{template "show-list-index-jijian.html"}
						{else}
						{template "show-list-index.html"}
						{/if}
						
					</div>
				{/if}
				{if $_GET['m'] == 'quan' }
				<div class="d-yuanjiao-10 d-kuan d-beijing-baise d-bianhua-20 d-shang-20">
				<div class="row d-quxian">
				    {module module=quan uid=$member.id zt=1 simi=0 num=120 return=quan}
				        <a href="{$quan.url}" class="">
				        <div class="col-md-6 col-xs-12 d-waigao-20 d-div-zou  " style="height:100px">
				        	<div class="d-beijing-hei-f6 d-neikuang-10 d-yuanjiao-10">
				        		<div class=" d-yuanjiao-10 pull-left">
				        			
				        			{if $quan.thumb}
				        			<img class="d-yuanjiao-20" src="{dr_thumb($quan.thumb)}" height="50" width="50"/>
				        			{else}
				        			<img class="d-yuanjiao-20" src="{HOME_THEME_PATH}quan/img/xinping.png" height="50" width="50"/>
				        			{/if}
				        		</div>
				        		<div class="d-zuo-10 pull-left">
				        			<a href="{$quan.url}" class="">
				        				<div class="d-jiacu d-wenzi-16 d-kuan">{dr_keyword_highlight($quan.title, $keyword)}</div>
				        				<div class="d-wenzi-14">
				        					<span>
				        						帖子
				        						{count action=table table=1_quan_form_son cid=$quan.id return=tiezi}
				        						{$tiezi_count}
				        					</span>
				        					<span class="d-zuo-20">
				        						用户: {$quan.joins}
				        					</span>
				        					{if $quan.fabu == '1' || $quan.uid == $member.id}
				        					<div class="d-chaochu-2 d-zitiyanse-hui-96 d-shang-10 d-yincang">
				        						{php $jianjie = dr_strcut($quan.description, 18);}
				        						
				        					</div>
				        					{else}
				        					
				        					{/if}
				        				</div>
				        			</a>
				        			
				        		</div>
				        		
				        		<div class="pull-right">
				        			<a href="{$quan.url}" class="d-kuan-50 pull-right">
				        			<div class="d-shang-10 d-xia-10 d-you-10 pull-right">
				        				<div class="d-shang-2 d-neikuang-5-10 d-beijing-hui d-yuanjiao-20 pull-right d-zitiyanse-hei"> 浏 览</div>
				        			</div>
				        			</a>
				        		</div>
				        		<div class="d-clear"></div>
				        		{if $quan.fabu == '1' || $quan.uid == $member.id}
				        		
				        		{else}
				        		<div class="d-chaochu d-zitiyanse-hui-96  d-yincang d-zuo-60">
				        			{dr_strcut($quan.description, 20)}
				        		</div>
				        		<div class="d-clear"></div>
				        		{/if}
				        	</div>
				        	
				        	
				        </div>
				        </a>
				    {/module}
					</div>
				</div>
				{/if}
				{if $_GET['m'] == 'simi' }
				<div class="d-yuanjiao-10 d-kuan d-beijing-baise d-bianhua-20 d-shang-20">
				<div class="row d-quxian">
				    {module module=quan uid=$member.id zt=1 simi=1 num=120 return=quan}
				        <a href="{$quan.url}" class="">
				        <div class="col-md-6 col-xs-12 d-waigao-20 d-div-zou  " style="height:100px">
				        	<div class="d-beijing-hei-f6 d-neikuang-10 d-yuanjiao-10">
				        		<div class=" d-yuanjiao-10 pull-left">
				        			
				        			{if $quan.thumb}
				        			<img class="d-yuanjiao-20" src="{dr_thumb($quan.thumb)}" height="50" width="50"/>
				        			{else}
				        			<img class="d-yuanjiao-20" src="{HOME_THEME_PATH}quan/img/xinping.png" height="50" width="50"/>
				        			{/if}
				        		</div>
				        		<div class="d-zuo-10 pull-left">
				        			<a href="{$quan.url}" class="">
				        				<div class="d-jiacu d-wenzi-16 d-kuan">{dr_keyword_highlight($quan.title, $keyword)}</div>
				        				<div class="d-wenzi-14">
				        					<span>
				        						帖子
				        						{count action=table table=1_quan_form_son cid=$quan.id return=tiezi}
				        						{$tiezi_count}
				        					</span>
				        					<span class="d-zuo-20">
				        						用户: {$quan.joins}
				        					</span>
				        					{if $quan.fabu == '1' || $quan.uid == $member.id}
				        					<div class="d-chaochu-2 d-zitiyanse-hui-96 d-shang-10 d-yincang">
				        						{php $jianjie = dr_strcut($quan.description, 18);}
				        						
				        					</div>
				        					{else}
				        					
				        					{/if}
				        				</div>
				        			</a>
				        			
				        		</div>
				        		
				        		<div class="pull-right">
				        			<a href="{$quan.url}" class="d-kuan-50 pull-right">
				        			<div class="d-shang-10 d-xia-10 d-you-10 pull-right">
				        				<div class="d-shang-2 d-neikuang-5-10 d-beijing-hui d-yuanjiao-20 pull-right d-zitiyanse-hei"> 浏 览</div>
				        			</div>
				        			</a>
				        		</div>
				        		<div class="d-clear"></div>
				        		{if $quan.fabu == '1' || $quan.uid == $member.id}
				        		
				        		{else}
				        		<div class="d-chaochu d-zitiyanse-hui-96  d-yincang d-zuo-60">
				        			{dr_strcut($quan.description, 20)}
				        		</div>
				        		<div class="d-clear"></div>
				        		{/if}
				        	</div>
				        	
				        	
				        </div>
				        </a>
				    {/module}
					</div>
				</div>
				{/if}
				</div>
			</div>
		</div>
	</div>
	<div id="mytupian" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mytupian">
		  <div class="modal-dialog modal-md" role="document">
			<div class="modal-content">
				<div class="d-neikuang-10">
					
					  <div class="form-group">
						<?php echo dr_fieldform('{"name":"背景图","fieldname":"beijingtu","ismain":"1","fieldtype":"File","setting":{"option":{"fieldtype":"","fieldlength":"","ext":"jpg,gif,png","size":"10","attachment":"0","image_reduce":"1000","is_ext_tips":"0","css":""},"validate":{"required":"0","pattern":"","errortips":"","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', $uidbeijingtu['beijingtu'], 1, 1);?>
					  </div>
					  <!--button @click="getHiddenInputValue">获取隐藏输入值</button--> 
					  <button  @click="getHiddenInputValue" class="btn btn-default">确认</button>
					
				</div>
			  
			</div>
		  </div>
		</div>
	<div class="d-container " >
		<div class="d-row">
			
		</div>
	</div>
	<div class="d-clear"></div>
	<div class="d-container ">
		<div class="d-row d-shang-15">
			<div class="d-col-md-8-juzhong ">
				
			</div>
		</div>
	</div>
	<div class="d-clear"></div>
	<div class="d-container ">
		<div class="d-row ">
			<div class="d-col-md-8-juzhong ">
				
			</div>
		</div>
	</div>
	</div>
</div>

<script>
    /*var Mpage=1;

    function dr_one_page() {
        Mpage = 1;
    }
    function dr_ajax_load_more(tid) {
        Mpage++;
        var url = '{SITE_URL}index.php?s=api&c=api&m=template&app=huiyuan&myuid={$myuid}&name=data_'+tid+'.html&format=json&page='+Mpage+'&'+Math.random();
        $.get(url,function(res){
            $('.footer-cont').hide();
            if(res.code==1){
                if (res.msg.indexOf("</li>") != -1) {
                    $('#list_'+tid).append(res.msg);
                    scroll_get = true;
                } else {
                    layer.msg("已经显示完了",{time:500});
                }
            }else{
                layer.msg(res.msg,{time:2500});
            }
        }, 'json');
    }*/
	var Mpage=1;
	
	//滚动显示更多
	var scroll_get = true;  //做个标志,不要反反复复的加载
	$(document).ready(function () {
	    $(window).scroll(function () {
	        if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
	            scroll_get = false;
	            /*layer.msg('内容加截中,请稍候',{time:1000});*/
				{if $quantiezifengge==4}
				dr_ajax_load_more_jijian();
				{else}
				dr_ajax_load_more();
				{/if}
	            
	        }
	    });
	});
	
	function dr_ajax_load_more(){
	    Mpage++;
	    $.get('{SITE_URL}index.php?s=api&c=api&m=template&app=huiyuan&myuid={$myuid}&name=show-list-{$_GET['m']}.html&format=json&page='+Mpage+'&'+Math.random(),function(res){
	        //$('.footer-cont').hide();
	        if(res.code==1){
	            if (res.msg.indexOf("</div>") != -1) {
	                $('#content_list').append(res.msg);
	                scroll_get = true;
	            } else {
	                layer.msg("已经显示完了",{time:500});
	            }
	        }else{
	            /*layer.msg(res.msg,{time:2500});*/
	        }
	    }, 'json');
	}
	function dr_ajax_load_more_jijian(){
	    Mpage++;
	    $.get('{SITE_URL}index.php?s=api&c=api&m=template&app=huiyuan&myuid={$myuid}&name=show-list-{$_GET['m']}-jijian.html&format=json&page='+Mpage+'&'+Math.random(),function(res){
	        //$('.footer-cont').hide();
	        if(res.code==1){
	            if (res.msg.indexOf("</div>") != -1) {
	                $('#content_list').append(res.msg);
	                scroll_get = true;
	            } else {
	                layer.msg("已经显示完了",{time:500});
	            }
	        }else{
	            /*layer.msg(res.msg,{time:2500});*/
	        }
	    }, 'json');
	}


	const { createApp } = Vue;
	const app = createApp({  
	        data() {  
	            return {  
	                list: []  ,// 初始化为空数组，稍后将用接口数据填充
					addResult: {} ,// 用于存储添加结果或错误信息的字符串
					newProduct: {},
					xiugai:{},
					xiugaiid:'',
					beijingtuValue:''
	            };  
	        },  
	        methods: {  
	            getHiddenInputValue() {  
	                  // 通过原生 DOM API 获取元素  
	                  const hiddenInput = document.getElementById('dr_beijingtu');  
	                  // 获取隐藏输入字段的值  
	                  const value = hiddenInput ? hiddenInput.value : null;  
	                  console.log('隐藏输入字段的值:', value); // 输出: 隐藏输入字段的值: 13  
					  this.addProduct(value);
	                },
				addProduct(e) {  
					//console.log('e',e);
				      // 使用axios发送POST请求  
					  var data = '&databeijingtu='+e;
					  
				      axios.post('/index.php?is_ajax=1&s=member&app=huiyuan&c=home&m=beijingtu', data)  
				        .then(response => {  
				          // 请求成功，处理响应数据  
						  if(response.data.code==0){
						  	layer.msg(response.data.msg,{time:500});
						  }
						  if(response.data.code==1){
						  	layer.msg(response.data.msg,{time:500});
							
							$("#mytupian").hide();
							$(".modal-backdrop").hide();
						  }
				          this.addResult = 'Product added successfully!'; // 或者使用response.data中的实际信息  
				          // 你可以根据需要清空表单字段或执行其他操作  
				          //this.newProduct = {}; // 清空表单  
						  
				        })  
				        .catch(error => {  
				          // 请求失败，处理错误  
				          this.addResult = 'Error adding product: ' + error.message;  
				          console.error('Error adding product:', error); // 在控制台打印错误信息  
				        });  
					
				},
				beijingtu(){
					
				}
				
				
				 
	        },
			mounted() {  
				
				// 使用 jQuery 监听 input 元素的变化  
				$('#dr_beijingtu').on('change', () => {
				  this.beijingtuValue = $('#dr_beijingtu').val(); 
				   console.log('tu',this.beijingtuValue);
				}); 
				
			}
	    });  
	    // 挂载应用到DOM元素上  
	app.mount('#huiyuan');  
	
	
</script>
{template "footer.html"}